package com.mf.service;

import java.util.List;

import com.mf.daoImpl.MusicDaoImpl;
import com.mf.entity.Music;

public class MusicService {
	
	MusicDaoImpl musicDaoImpl=new MusicDaoImpl();
	Music music=new Music();
	
	public List<Music> getAllMusic(){
		return  musicDaoImpl.getAllMusic();
	}
	
	public void delMusic(int id){
		Music music=new Music();
		music.setId(id);
		musicDaoImpl.delete(music);
	}
	
	public Music getMusic(String id){
		int intId=Integer.parseInt(id);
		music.setId(intId);
		return musicDaoImpl.select(music);
	}
	
	public void updateMusic(Music music){
		musicDaoImpl.update(music);
	}
	
}
